const loc = window.localStorage
export const getData = key => {
  let result = null
  try {
    result = JSON.parse(loc.getItem(key))
  }
  catch(err) {}
  return result
}
export const setData = (key, value) => loc.setItem(key, JSON.stringify(value))
export const delData = key => loc.removeItem(key)